package com.ruoyi.app.service;

import com.ruoyi.app.domain.AppGoodsInfo;
import com.ruoyi.app.domain.vo.AppGoodsInfoVo;
import com.ruoyi.app.domain.bo.AppGoodsInfoBo;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.domain.PageQuery;

import java.util.Collection;
import java.util.List;

/**
 * APP商城订单关联商品Service接口
 *
 * @author heike
 * @date 2025-03-02
 */
public interface IAppGoodsInfoService {

    /**
     * 查询APP商城订单关联商品
     */
    AppGoodsInfoVo queryById(Long id);

    /**
     * 根据订单号查询商品信息
     */
    List<AppGoodsInfoVo> queryOrderNo(String orderNo);

    /**
     * 查询APP商城订单关联商品列表
     */
    TableDataInfo<AppGoodsInfoVo> queryPageList(AppGoodsInfoBo bo, PageQuery pageQuery);

    /**
     * 查询APP商城订单关联商品列表
     */
    List<AppGoodsInfoVo> queryList(AppGoodsInfoBo bo);

    /**
     * 新增APP商城订单关联商品
     */
    Boolean insertByBo(AppGoodsInfoBo bo);

    /**
     * 修改APP商城订单关联商品
     */
    Boolean updateByBo(AppGoodsInfoBo bo);


    /**
     * 添加订单的关联商品
     *
     * @param appGoodsInfoBos 商品信息
     * @return
     */
    Boolean inserts(List<AppGoodsInfo> appGoodsInfoBos);

    /**
     * 校验并批量删除APP商城订单关联商品信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
}
